import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

const routes = [

    {
        path: '/',
        name: 'Home',
        component: () => import('../views/Home')
    },
    {
        path: '/goods',
        name: 'Goods',
        component: () => import('../views/Goods.vue')
    },
    {
        path: '/goods/details',
        name: 'Details',
        component: () => import('../views/Details.vue')
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('../views/About.vue')
    },
    {
        path: '/shoppingCart',
        name: 'ShoppingCart',
        component: () => import('../views/ShoppingCart.vue'),
    },
    {
        path: '/collect',
        name: 'Collect',
        component: () => import('../views/Collect.vue'),
    },
    {
        path: '/confirmOrder',
        name: 'ConfirmOrder',
        component: () => import('../views/ConfirmOrder.vue'),
    },
    {
        path: '/order',
        name: 'Order',
        component: () => import('../views/Order.vue'),
    }
];
const router = new Router({
    base: '/',
    mode: 'history',
  routes
});

export default router